package org.example.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.domain.Admin;

@Mapper
public interface AdminMapper {

    @Select("SELECT * FROM admin WHERE account=#{account} LIMIT 1;")
    Admin login(String account);

    @Update("UPDATE admin SET name=#{name},password=#{password} WHERE id=#{id};")
    void changeAdminInfo(Admin admin);

    @Select("SELECT * FROM admin WHERE id=1;")
    Admin checkAdminOnePassword();
}